package com.itheima.controller;

import com.itheima.pojo.*;
import com.itheima.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController

public class ReportController {
    @Autowired
    ReportService reportService;
//部门人数统计
    @GetMapping("/report/empJobData")
    public Result getEmpJobData() {
        JobOption jobOption=reportService.getEmpJobData();
        return Result.success(jobOption);
    }
    //性别人数统计
    @GetMapping("/report/empGenderData")
    public Result getgenderdata(){
        List<GenderData> genderData=reportService.getgenderdata();
        return Result.success(genderData);
    }
    //学历统计
    @GetMapping("/report/studentDegreeData")
    public Result getEduBackg(){
        List<EduBackgData>eduBackgData=reportService.getEduBackg();
        return Result.success(eduBackgData);
    }
    //班级人数统计
    @GetMapping("/report/studentCountData")
    public Result getClazzNunData(){
        ClazzDataQD clazzDataQDList=reportService.getClazzNunData();
        return Result.success(clazzDataQDList);
    }
}
